<template>
  <div class="myprofile">
    <commonHeader v-if="headerShow" :title="title" @goBack="goBack"></commonHeader>
    <div class="content">
        <div class="textareadiv">
         <van-field
            v-model="message"
            rows="1"
            autosize
            type="textarea"
            maxlength="45"
            placeholder="说点什么吧~"
            show-word-limit
          />
        </div>
        <label class="submitbtn" @click="save">确认保存</label>
    </div>
  </div>
</template>

<script>
  import commonHeader from "../../components/common/commonHeader.vue"
  export default {
        name:"myprofile",
        components:{
          commonHeader
        },
        data(){
          return{
            message:"",
            title:"简介",
            subtitle:"",
            headerShow:true,//固定顶部显示
          }
        },
        methods:{
          goBack(){
            this.$router.go(-1);
          },
          save(){
              if(this.message!=""){
                this.$router.push({name:"myPersonalDataEdit",params:{message:this.message}})
              }
          }
        },
        created(){
            if(this.$route.params.message!=undefined){
              this.message=this.$route.params.message;
            }
        }
  }
</script>

<style lang="less" scoped>
       .myprofile{
           .content{
              margin-top: 1.65rem;
              .textareadiv{
                width:6.9rem;
                height:2.42rem;
                background:rgba(35,35,35,1);
                border-radius:0.05rem;
                margin: 0 auto;
                textarea
                {
                  width: 100%;
                  height: 1.8rem;
                  background: none;
                  text-indent: 1em;
                  margin-top: 0.1rem;
                  font-size:0.34rem;
                }
                label
                {
                  display: block;
                  color:rgba(255,255,255,0.3);
                  font-size: 0.24rem;
                  width: 90%;
                  margin: 0 auto;
                  text-align: right;
                  text-indent: 1em;
                  margin-top: 0.1rem;
                }
                /deep/.van-cell
                {
                  background: none;
                  height:2.42rem !important;
                }
                /deep/.van-field__control
                {
                  height: 1.5rem !important;
                  color: #ffffff;
                }
              }
              .submitbtn
              {
                display: block;
                width:6.78rem;
                height:0.86rem;
                background:rgba(253,0,0,1);
                border-radius:0.1rem;
                font-size:0.36rem;
                color: #ffffff;
                line-height: 0.86rem;
                text-align: center;
                margin: 0 auto;
                margin-top: 0.4rem;
              }
           }
       }
</style>
